package com.yss.ams.demo.controller;

import com.yss.ams.demo.pojo.Messageboard;
import com.yss.ams.demo.service.DataSourceTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shenyao
 * @date 2021/3/28
 * @description:
 */

@RestController
public class TestController {
    @Autowired
    DataSourceTestService dataSourceTestServiceImpl;

    @RequestMapping("/testDbSource")
    public void testDbSource() {
        Messageboard messageboard = dataSourceTestServiceImpl.testMaster(1);
        System.out.println(messageboard.toString());
        Messageboard messageboard2 = dataSourceTestServiceImpl.testCluster(1);
        System.out.println(messageboard2.toString());
        Messageboard messageboard3 = dataSourceTestServiceImpl.testMaster(1);
        System.out.println(messageboard3.toString());
    }

}
